<template>
  <div>
      <div class="nav">
          <div class="nav_wrapper border-bottom-1px">
              <div class="item" :class="{action:comaction=='item1'}" @click="changecomponent('item1')">
                  关注店铺列表
              </div>
              <div class="item" :class="{action:comaction=='item2'}" @click="changecomponent('item2')">
                  关注店铺动态
              </div>
          </div>
      </div>
      <div class="wrapper">
          <!-- <component v-if="comaction == 'item1'" :is="comaction" :followList="followList" keep-alive></component> -->
          <!-- <component v-else :is="comaction" :dynamic="attention_dynamic" keep-alive></component> -->
          <keep-alive>
              <component :is="comaction"></component>
          </keep-alive>
      </div>
  </div>
</template>
<script>
import item1 from '@/components/zerone/FollowItem1'
import item2 from '@/components/zerone/FollowItem2'
export default {
    name:"follow",
    data(){
        return{
            comaction:"item1",
            page:1,
        }
    },
    metaInfo: {
      title: "我的关注"
    },
    methods:{
        changecomponent:function(com){
            this.comaction = com;
        },

    },
    components:{
        item1,
        item2
    },
    mounted:function(){
    },
}
</script>
<style scoped>
.nav_wrapper{
    height: 1.76rem;
    display: flex;
    justify-content: center;
    align-items: center;
}
.border-bottom-1px::after{
    border-color: #E4E4E4;
}
.nav_wrapper .item{
    height: 100%;
    line-height: 1.76rem;
    flex: 1;
    color: #424242;
    font-size: .56rem;
    position: relative;
}
.nav_wrapper .action{
    color: #0FB199;
    font-weight:600;
}
.nav_wrapper .action::after{
    content: "";
    display: block;
    width: 1.8rem;
    height: .08rem;
    background: #0FB199;
    border-radius: .12rem;
    position: absolute;
    left: 50%;
    bottom: .24rem;
    transform: translate(-50%,0);
}
.wrapper{
    position: fixed;
    top: 1.76rem;
    left: 0;
    width: 100%;
}

</style>
